#pragma once

#include <QtCore/QtGlobal>
#include "GUIWidget/GUIWidgetBase.h"


namespace EventOper 
{
	class ParaWidgetInterfaceOperator;
}

namespace Ui 
{
	class GUIDataOutletWidget;
}

namespace Interface 
{
	class FITKCDDataOutlet;
}


namespace GUI
{
	class MainWindow;
	class GUIWIDGETAPI GUIDataOutletWidget : public GUIWidgetBase
	{
		Q_OBJECT
	public:
		GUIDataOutletWidget(Interface::FITKCDDataOutlet* obj, EventOper::ParaWidgetInterfaceOperator* oper, QWidget* parent = nullptr);
		~GUIDataOutletWidget();

		void init();

    private slots:
		void on_lineEdit_Name_editingFinished();
		void on_doubleSpinBox_Minimum_xyz0_valueChanged(double value);
		void on_doubleSpinBox_Minimum_xyz1_valueChanged(double value);
		void on_doubleSpinBox_Minimum_xyz2_valueChanged(double value);
		void on_doubleSpinBox_Maximum_xyz0_valueChanged(double value);
		void on_doubleSpinBox_Maximum_xyz1_valueChanged(double value);
		void on_doubleSpinBox_Maximum_xyz2_valueChanged(double value);

    private:
		void setDataToWidget();

    private:
        EventOper::ParaWidgetInterfaceOperator* _oper = nullptr;
		Ui::GUIDataOutletWidget* _ui = nullptr;

		Interface::FITKCDDataOutlet* _obj;
	};
}